# Group Accounts

## api/v0.2/accounts/{accountIdOrAddress}/{stateType} [/accounts/{accountIdOrAddress}/{stateType}]

+ Parameters
    + accountIdOrAddress (required, string, `1`) ... Account ID or address in the zkSync network
    + stateType (required, "committed" | "finalized", `committed`) ... The type of account state which you want to get

### Get account state [GET]
Returns committed or finalized account state

+ Response 200 (application/json)
    + Attributes
        + request (Request, required)
        + status: success (string, required)
        + result (Account, required{{isResultNullable}})
        + error (Error, required, nullable)

## api/v0.2/accounts/{accountIdOrAddress} [/accounts/{accountIdOrAddress}]

+ Parameters
    + accountIdOrAddress (required, string, `1`) ... Account ID or address in the zkSync network

### Get account full state [GET]
Returns both committed and finalized account states

+ Response 200 (application/json)
    + Attributes
        + request (Request, required)
        + status: success (string, required)
        + result (Account.FullInfo, required{{isResultNullable}})
        + error (Error, required, nullable)

## api/v0.2/accounts/{accountIdOrAddress}/transactions [/accounts/{accountIdOrAddress}/transactions{?from,limit,direction,token,secondAddress}]

+ Parameters
    + accountIdOrAddress (required, string, `1`) ... Account ID or address in the zkSync network
    + from (required, "latest" | string, `latest`) ... The hash of the transaction from which to show or `latest`
    + limit (required, number, `2`) ... The limit of transactions to be shown
    + direction (required, "newer" | "older", `older`) ... Newer or older than the ID of the `from`
    + token (optional, string, `0`) ... ID, address or symbol of the token used in transactions
    + secondAddress (optional, string, `2`) ... Account ID or address of account to filter by. If specified it will return only transactions which affect both accounts


### Get account transactions [GET]
Returns the transactions for a particular account according to the query params

+ Response 200 (application/json)
    + Attributes
        + request (Request, required)
        + status: success (string, required)
        + result (object, required{{isResultNullable}})
            + pagination (PaginationFromHash, required)
            + list (array[Transaction.InBlock], required)
        + error (Error, required, nullable)

## api/v0.2/accounts/{accountIdOrAddress}/transactions/pending [/accounts/{accountIdOrAddress}/transactions/pending{?from,limit,direction}]

+ Parameters
    + accountIdOrAddress (required, string, `1`) ... Account ID or address in the zkSync network
    + from (required, "latest" | number, `100`) ... The hash of the transaction from which to show or `latest`
    + limit (required, number, `2`) ... The limit of transactions to be shown
    + direction (required, "newer" | "older", `older`) ... Newer or older than the ID of the `from`

### Get pending priority operations [GET]
Get account pending priority operations.

+ Response 200 (application/json)
    + Attributes
        + request (Request, required)
        + status: success (string, required)
        + result (object, required{{isResultNullable}})
            + pagination (PaginationFromNumber, required)
            + list (array[Transaction.InBlock.L1], required)
        + error (Error, required, nullable)
